package com.ysh.smartplatform.pojo;


import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.List;

/**
 * Created by Jackiechan on 2022/9/15 14:50
 *
 * @author Jackiechan
 * @version 1.0
 * @since 1.0
 */
public class BaseUser extends User {

    private Long uId;


    private List<Role> roleList;




    public BaseUser(String username, String password, Collection<? extends GrantedAuthority> authorities, Long uId) {
        super(username, password, authorities);
        this.uId=uId;
    }

    public BaseUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities, Long uId) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.uId=uId;
    }

    public Long getuId() {
        return uId;
    }

    public void setuId(Long uId) {
        this.uId = uId;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }
}
